package io.renren.modules.dynamic.controller;

import io.renren.common.utils.R;
import io.renren.modules.dynamic.service.DynamicTestService;
import io.renren.modules.sys.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

/**
 * 多数据源事务控制测试
 *
 * @author hou 2019-5-29 10:04:04
 */
@RestController
@RequestMapping(value = "dynamic/test")
public class DynamicTestController extends AbstractController {

    @Autowired
    private DynamicTestService testService;

    @PostMapping(value = "del")
    public R del() throws SQLException {
        logger.info("dynamic test del begin");
        return testService.del();
    }
}
